package com.ruoyi.service.service.impl;

import java.util.Collections;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.service.mapper.CheServiceItemsMidMapper;
import com.ruoyi.service.domain.CheServiceItemsMid;
import com.ruoyi.service.service.ICheServiceItemsMidService;

/**
 * 服务详情与服务中间表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-03
 */
@Service
public class CheServiceItemsMidServiceImpl implements ICheServiceItemsMidService 
{
    @Autowired
    private CheServiceItemsMidMapper cheServiceItemsMidMapper;

    /**
     * 查询服务详情与服务中间表
     * 
     * @param id 服务详情与服务中间表主键
     * @return 服务详情与服务中间表
     */
    @Override
    public CheServiceItemsMid selectCheServiceItemsMidById(Long id)
    {
        return cheServiceItemsMidMapper.selectCheServiceItemsMidById(id);
    }

    /**
     * 查询服务详情与服务中间表列表
     * 
     * @param cheServiceItemsMid 服务详情与服务中间表
     * @return 服务详情与服务中间表
     */
    @Override
    public List<CheServiceItemsMid> selectCheServiceItemsMidList(CheServiceItemsMid cheServiceItemsMid)
    {
        return cheServiceItemsMidMapper.selectCheServiceItemsMidList(cheServiceItemsMid);
    }

    /**
     * 新增服务详情与服务中间表
     * 
     * @param cheServiceItemsMid 服务详情与服务中间表
     * @return 结果
     */
    @Override
    public int insertCheServiceItemsMid(CheServiceItemsMid cheServiceItemsMid)
    {
        return cheServiceItemsMidMapper.insertCheServiceItemsMid(cheServiceItemsMid);
    }

    /**
     * 修改服务详情与服务中间表
     * 
     * @param cheServiceItemsMid 服务详情与服务中间表
     * @return 结果
     */
    @Override
    public int updateCheServiceItemsMid(CheServiceItemsMid cheServiceItemsMid)
    {
        return cheServiceItemsMidMapper.updateCheServiceItemsMid(cheServiceItemsMid);
    }

    /**
     * 批量删除服务详情与服务中间表
     * 
     * @param ids 需要删除的服务详情与服务中间表主键
     * @return 结果
     */
    @Override
    public int deleteCheServiceItemsMidByIds(Long[] ids)
    {
        return cheServiceItemsMidMapper.deleteCheServiceItemsMidByIds(ids);
    }

    /**
     * 删除服务详情与服务中间表信息
     * 
     * @param id 服务详情与服务中间表主键
     * @return 结果
     */
    @Override
    public int deleteCheServiceItemsMidById(Long id)
    {
        return cheServiceItemsMidMapper.deleteCheServiceItemsMidById(id);
    }

    @Override
    public List<CheServiceItemsMid> selectCheServiceItemsMidByServiceId(Long service_id) {

        return cheServiceItemsMidMapper.selectCheServiceItemsMidListByServiceId(service_id);
    }
}
